package com.poetize.plus.annotation;

import com.poetize.plus.validator.SecretValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

/**
 *
 * 密钥检验注解
 *
 * @author zuosy
 * @created 2024/3/28 15:28
 */
@Documented
@Constraint(validatedBy = SecretValidator.class)
@Target({ ElementType.METHOD, ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
public @interface Secret {

    String message() default "密钥长度不合法";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
